#!/bin/bash
## 该脚本用于自动化配置 NGINX 日志切割功能

#1. 将切割脚本ngx_rotate.sh部署到/usr/local/bin目录
echo -e "拷贝文件到指定目录/Copy the shell script\n..."
cp ngx_rotate.sh /usr/local/bin
#2. 添加计划任务，每日0时执行切割脚本
echo -e "添加计划任务/Add to cron\n..."
echo "00 00 * * * /bin/bash /usr/local/bin/ngx_rotate.sh > /dev/null 2>&1"
echo "部署完成！/Deployment completed!"